<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('setting',$postdata);
		exi('设置成功');
	}
	$return['item']=$this->plugin_setting('setting');
	$htmls=array(
		'type'=>'edit',
		'desc'=>'眼药水分销设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基础设置',
				'list'=>array(
					array('type'=>'switch','title'=>'是否启用','name'=>'yao_isopen'),
					array('type'=>'choose_many','name'=>'yao_goods','title'=>'眼药水商品选择','action'=>'jy_weishop/goods.get_goods/many/','choose_title'=>'选择参与的商品'),
					array('type'=>'unitstring','unit'=>'%','title'=>'直推分销比率','name'=>'yao_rate'),
					array('type'=>'unitstring','unit'=>'%','title'=>'间推分销比率','name'=>'yao_rate2'),
				)
			),
		)
	);
	$return['htmls']=$htmls;
	exi($return);
}


